(global.webpackJsonp = global.webpackJsonp || []).push([ [ "question/detail/index" ], {
    2411: function(t, e, n) {
        n.d(e, "b", function() {
            return i;
        }), n.d(e, "c", function() {
            return o;
        }), n.d(e, "a", function() {});
        var i = function() {
            var t = this, e = (t.$createElement, t._self._c, 2 == t.questionInfo.type ? t.__map(t.questionInfo.question_data, function(e, n) {
                var i = t.__get_orig(e), o = 1 == t.type && -1 != t.questionInfo.answer_data.indexOf(e.index), s = o && t.questionInfo.is_yd ? null : 1 == t.type && -1 != t.questionInfo.yd_answer.indexOf(e.index), r = 1 == t.type && t.questionInfo.is_yd ? t.questionInfo.yd_answer.includes(e.index) && t.questionInfo.answer_data.includes(e.index) : null, a = 1 == t.type && t.questionInfo.is_yd && !r ? 1 == t.type && -1 != t.questionInfo.yd_answer.indexOf(e.index) : null, u = 1 == t.type && t.questionInfo.is_yd ? t.questionInfo.yd_answer.includes(e.index) && t.questionInfo.answer_data.includes(e.index) : null;
                return {
                    $orig: i,
                    g0: o,
                    g1: s,
                    g2: r,
                    g3: a,
                    g4: u,
                    g5: 1 == t.type && t.questionInfo.is_yd && !u ? t.questionInfo.yd_answer.indexOf(e.index) : null
                };
            }) : null), n = 4 == t.questionInfo.type ? t.__map(t.questionInfo.question_data, function(e, n) {
                var i = t.__get_orig(e), o = 1 == t.type && -1 != t.questionInfo.answer_data.indexOf(e.value), s = o && t.questionInfo.is_yd && 1 == t.questionInfo.chaos_mate || 1 == t.type && t.questionInfo.answer_data[n] == e.value && t.questionInfo.is_yd && 0 == t.questionInfo.chaos_mate ? null : 1 == t.type && -1 != t.questionInfo.yd_answer.indexOf(e.value), r = 1 == t.type && -1 != t.questionInfo.answer_data.indexOf(e.value), a = e.g8 && t.questionInfo.is_yd && -1 != t.questionInfo.yd_answer.indexOf(e.value), u = 1 == t.type && t.questionInfo.answer_data[n] == e.value && t.questionInfo.is_yd && -1 != t.questionInfo.yd_answer.indexOf(e.value), c = a && 1 == t.questionInfo.chaos_mate || u && 0 == t.questionInfo.chaos_mate ? null : 1 == t.type && -1 != t.questionInfo.yd_answer.indexOf(e.value), f = -1 != t.questionInfo.answer_data.indexOf(e.value) && t.questionInfo.is_yd, l = e.g12 && -1 != t.questionInfo.yd_answer.indexOf(e.value), d = t.questionInfo.answer_data[n] == e.value && t.questionInfo.is_yd && -1 != t.questionInfo.yd_answer.indexOf(e.value);
                return {
                    $orig: i,
                    g6: o,
                    g7: s,
                    g8: r,
                    g9: a,
                    g10: u,
                    g11: c,
                    g12: f,
                    g13: l,
                    g14: d,
                    g15: 1 == t.type && l && 1 == t.questionInfo.chaos_mate || d && 0 == t.questionInfo.chaos_mate ? null : 1 == t.type && -1 != t.questionInfo.yd_answer.indexOf(e.value)
                };
            }) : null;
            t.$mp.data = Object.assign({}, {
                $root: {
                    l0: e,
                    l1: n
                }
            });
        }, o = [];
    },
    "2ce1": function(t, e, n) {
        n.r(e);
        var i = n("cf62"), o = n.n(i);
        for (var s in i) "default" !== s && function(t) {
            n.d(e, t, function() {
                return i[t];
            });
        }(s);
        e.default = o.a;
    },
    "4a76": function(t, e, n) {
        var i = n("6d6e");
        n.n(i).a;
    },
    "6d6e": function(t, e, n) {},
    "6fd2": function(t, e, n) {
        n.r(e);
        var i = n("2411"), o = n("2ce1");
        for (var s in o) "default" !== s && function(t) {
            n.d(e, t, function() {
                return o[t];
            });
        }(s);
        n("4a76");
        var r = n("f0c5"), a = Object(r.a)(o.default, i.b, i.c, !1, null, "09a3a4ec", null, !1, i.a, void 0);
        e.default = a.exports;
    },
    a541: function(t, e, n) {
        (function(t) {
            n("1067"), i(n("66fd"));
            var e = i(n("6fd2"));
            function i(t) {
                return t && t.__esModule ? t : {
                    default: t
                };
            }
            wx.__webpack_require_UNI_MP_PLUGIN__ = n, t(e.default);
        }).call(this, n("543d").createPage);
    },
    cf62: function(t, e, n) {
        (function(t) {
            Object.defineProperty(e, "__esModule", {
                value: !0
            }), e.default = void 0;
            var i = n("26cb"), o = n("8434"), s = n("db8f"), r = n("9b63");
            function a(t, e) {
                var n;
                if ("undefined" == typeof Symbol || null == t[Symbol.iterator]) {
                    if (Array.isArray(t) || (n = function(t, e) {
                        if (t) {
                            if ("string" == typeof t) return u(t, e);
                            var n = Object.prototype.toString.call(t).slice(8, -1);
                            return "Object" === n && t.constructor && (n = t.constructor.name), "Map" === n || "Set" === n ? Array.from(t) : "Arguments" === n || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) ? u(t, e) : void 0;
                        }
                    }(t)) || e && t && "number" == typeof t.length) {
                        n && (t = n);
                        var i = 0, o = function() {};
                        return {
                            s: o,
                            n: function() {
                                return i >= t.length ? {
                                    done: !0
                                } : {
                                    done: !1,
                                    value: t[i++]
                                };
                            },
                            e: function(t) {
                                throw t;
                            },
                            f: o
                        };
                    }
                    throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
                }
                var s, r = !0, a = !1;
                return {
                    s: function() {
                        n = t[Symbol.iterator]();
                    },
                    n: function() {
                        var t = n.next();
                        return r = t.done, t;
                    },
                    e: function(t) {
                        a = !0, s = t;
                    },
                    f: function() {
                        try {
                            r || null == n.return || n.return();
                        } finally {
                            if (a) throw s;
                        }
                    }
                };
            }
            function u(t, e) {
                (null == e || e > t.length) && (e = t.length);
                for (var n = 0, i = new Array(e); n < e; n++) i[n] = t[n];
                return i;
            }
            function c(t, e) {
                var n = Object.keys(t);
                if (Object.getOwnPropertySymbols) {
                    var i = Object.getOwnPropertySymbols(t);
                    e && (i = i.filter(function(e) {
                        return Object.getOwnPropertyDescriptor(t, e).enumerable;
                    })), n.push.apply(n, i);
                }
                return n;
            }
            function f(t) {
                for (var e = 1; e < arguments.length; e++) {
                    var n = null != arguments[e] ? arguments[e] : {};
                    e % 2 ? c(Object(n), !0).forEach(function(e) {
                        l(t, e, n[e]);
                    }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(n)) : c(Object(n)).forEach(function(e) {
                        Object.defineProperty(t, e, Object.getOwnPropertyDescriptor(n, e));
                    });
                }
                return t;
            }
            function l(t, e, n) {
                return e in t ? Object.defineProperty(t, e, {
                    value: n,
                    enumerable: !0,
                    configurable: !0,
                    writable: !0
                }) : t[e] = n, t;
            }
            var d = {
                components: {},
                data: function() {
                    return {
                        type: "",
                        index: 1,
                        total: "",
                        time: "00:00",
                        currectAnswerNum: 0,
                        errorAnswerNum: 0,
                        score: 0,
                        currectAnswer: "",
                        userAnswer: "",
                        disabled: !1,
                        isShow: !1,
                        isShows: !1,
                        listTotal: [],
                        paper: {},
                        questionInfo: {
                            type: "",
                            title: "",
                            is_yd: !1,
                            yd_answer: "",
                            answer_data: "",
                            tx_answer: "",
                            question_data: [],
                            isPanchoose: -1
                        },
                        totaltime: "00:00",
                        second: 0,
                        timer: "",
                        serviceClass: "",
                        checkClass: "",
                        rowwidth: "",
                        isShowTrue: !0,
                        mbshow: 0,
                        height: 0,
                        iSchoose: -1,
                        arrayEq: !1
                    };
                },
                computed: f(f({}, (0, i.mapGetters)([ "mainColor" ])), {}, {
                    arrayEqq: function() {}
                }),
                created: function() {},
                onLoad: function(t) {
                    this.paper_id = t.id, this.getQuestion();
                },
                onHide: function() {
                    clearInterval(this.timer);
                },
                onUnload: function() {
                    clearInterval(this.timer);
                },
                destoryed: function() {
                    clearInterval(this.timer);
                },
                methods: {
                    getQuestion: function() {
                        var t = this, e = {
                            paper_id: t.paper_id
                        };
                        (0, r.question)(e).then(function(e) {
                            t.listTotal = e.question_list, t.paper = e.paper, t.type = parseInt(e.paper.type), 
                            t.total = e.question_list.length, e.question_list.length > 0 && t.computedQuest(0, !0);
                        });
                    },
                    load: function() {
                        this.isShow = !0, this.isShows = !0;
                    },
                    joinWorn: function() {
                        var t = this, e = {
                            paper_id: t.paper_id,
                            q_id: t.listTotal[t.index - 1].id,
                            q_data: t.listTotal[t.index - 1]
                        };
                        (0, r.addWrongBook)(e).then(function(e) {
                            t.$toast("加入成功", "none");
                        });
                    },
                    showMb: function() {
                        var e = this;
                        this.serviceClass = "show", e.isShowTrue && (setTimeout(function() {
                            t.createSelectorQuery().select(".row").boundingClientRect(function(t) {
                                e.rowwidth = (t.width - 60) / 7 + "px", e.mbshow = e.listTotal.length;
                            }).exec();
                        }, 100), setTimeout(function() {
                            t.createSelectorQuery().select(".layer").boundingClientRect(function(t) {
                                e.height = t.height - 35 + "px";
                            }).exec();
                        }, 100), e.isShowTrue = !1);
                    },
                    hideService: function() {
                        var t = this;
                        this.serviceClass = "hide", setTimeout(function() {
                            t.serviceClass = "none";
                        }, 100);
                    },
                    stop: function() {
                        this.checkClass = "show", clearInterval(this.timer);
                    },
                    begin: function() {
                        var t = this, e = this;
                        this.checkClass = "hide", setTimeout(function() {
                            t.checkClass = "none";
                        }, 200), this.timer = setInterval(function() {
                            if (2 == e.paper.time_limit_type && e.second == e.paper.time_limit) return e.submit(2), 
                            clearInterval(e.timer), !1;
                            e.second++, e.time = (0, s.formatSeconds)(e.second);
                        }, 1e3);
                    },
                    hideCheck: function() {},
                    discard: function() {},
                    select: function(t) {
                        var e = this;
                        this.index = t + 1, e.listTotal[this.index - 1].hasOwnProperty("is_yd") ? (e.questionInfo = "", 
                        e.questionInfo = e.listTotal[this.index - 1]) : e.computedQuest(this.index - 1), 
                        this.hideService();
                    },
                    pre: function() {
                        var t = this;
                        if (1 == t.index) return !1;
                        this.isShow = !1, t.listTotal[t.index - 1] = t.questionInfo, t.index--, t.questionInfo = "", 
                        t.questionInfo = t.listTotal[t.index - 1];
                    },
                    next: function() {
                        var t = this;
                        if (t.index == t.listTotal.length) return t.questionInfo.is_yd || (t.questionInfo.tx_answer = !1), 
                        t.listTotal[t.index - 1] = t.questionInfo, t.submit(1), !1;
                        this.isShow = !1, t.questionInfo.is_yd || (t.questionInfo.tx_answer = !1), t.listTotal[t.index - 1] = t.questionInfo, 
                        t.index++, t.listTotal[t.index - 1].hasOwnProperty("is_yd") ? (t.questionInfo = "", 
                        t.questionInfo = t.listTotal[t.index - 1]) : t.computedQuest(t.index - 1);
                    },
                    computedQuest: function(t, e) {
                        var n = this;
                        1 == n.listTotal[t].type || 2 == n.listTotal[t].type ? n.listTotal[t].question_data.map(function(e, i) {
                            e.index = n.getAZ(i), e.contents = e.content.includes("<p>") && 0 == e.content.indexOf("<p>") ? e.content.slice(0, 3) + n.getAZ(i) + "." + e.content.slice(3) : n.getAZ(i) + "." + e.content, 
                            2 != n.listTotal[t].type && 1 != n.listTotal[t].type && 3 != n.listTotal[t].type || (e.iSchoose = !1);
                        }) : 4 == n.listTotal[t].type && n.listTotal[t].question_data.map(function(t, e) {
                            t.disabled = !1;
                        }), 2 == n.listTotal[t].type || 4 == n.listTotal[t].type ? n.listTotal[t].yd_answer = [] : n.listTotal[t].yd_answer = "", 
                        n.listTotal[t].is_yd = !1, -1 != n.listTotal[t].title.indexOf("<p>") ? n.listTotal[t].titles = 0 == parseInt(n.listTotal[t].score) ? n.listTotal[t].title : n.listTotal[t].title.substr(0, n.listTotal[t].title.length - 4) + "&nbsp;&nbsp;(" + n.listTotal[t].score + "分)</p>" : n.listTotal[t].titles = 0 == parseInt(n.listTotal[t].score) ? n.listTotal[t].title : n.listTotal[t].title + "&nbsp;&nbsp;(" + n.listTotal[t].score + "分)", 
                        n.questionInfo = "", n.questionInfo = n.listTotal[t], 1 == n.paper.time_limit_type && e ? n.time = (0, 
                        s.formatSeconds)(0) : 2 == n.paper.time_limit_type && e && (n.time = (0, s.formatSeconds)(0), 
                        n.totaltime = (0, s.formatSeconds)(n.paper.time_limit)), e && (this.timer = setInterval(function() {
                            if (2 == n.paper.time_limit_type && n.second == n.paper.time_limit) return n.submit(2), 
                            clearInterval(n.timer), !1;
                            n.second++, n.time = (0, s.formatSeconds)(n.second);
                        }, 1e3));
                    },
                    chooseAnswer: function(t) {
                        var e = this;
                        if (1 == this.questionInfo.is_yd && 1 == this.type) return !1;
                        this.questionInfo.yd_answer = t.index, this.questionInfo.is_yd = !0;
                        var n, i = a(this.questionInfo.question_data);
                        try {
                            for (i.s(); !(n = i.n()).done; ) {
                                n.value.iSchoose = !1;
                            }
                        } catch (t) {
                            i.e(t);
                        } finally {
                            i.f();
                        }
                        t.iSchoose = !t.iSchoose, t.index == this.questionInfo.answer_data ? (e.currectAnswerNum++, 
                        e.questionInfo.tx_answer = !0, setTimeout(function() {
                            e.next();
                        }, 300)) : (e.errorAnswerNum++, e.questionInfo.tx_answer = !1, e.currectAnswer = e.questionInfo.answer_data, 
                        e.userAnswer = e.questionInfo.yd_answer, 2 == e.type && setTimeout(function() {
                            e.next();
                        }, 300));
                    },
                    chooseDAnswer: function(t, e) {
                        var n = "";
                        if (1 == this.questionInfo.is_yd && 1 == this.type) return !1;
                        t.iSchoose = !t.iSchoose, t.iSchoose ? this.questionInfo.yd_answer.push(t.index) : (n = this.questionInfo.yd_answer.indexOf(t.index)) > -1 && this.questionInfo.yd_answer.splice(n, 1), 
                        this.$forceUpdate();
                    },
                    sureAnswer: function() {
                        var t = this;
                        return 0 == this.questionInfo.yd_answer.length ? (t.$toast("请先选择答案", "none"), !1) : 1 == this.questionInfo.yd_answer.length ? (t.$toast("至少选择两个以上答案", "none"), 
                        !1) : (!this.questionInfo.is_yd || 1 != this.type) && (this.questionInfo.is_yd = !0, 
                        this.arrayEq = !1, this.$forceUpdate(), void ((0, s.isEqual)(this.questionInfo.yd_answer, this.questionInfo.answer_data) ? (t.currectAnswerNum++, 
                        t.questionInfo.tx_answer = !0, setTimeout(function() {
                            t.next();
                        }, 300)) : (t.errorAnswerNum++, t.questionInfo.tx_answer = !1, t.currectAnswer = t.questionInfo.answer_data.join("、"), 
                        t.userAnswer = t.questionInfo.yd_answer.join("、"), t.computedArrayEq(), 2 == t.type && setTimeout(function() {
                            t.next();
                        }, 300))));
                    },
                    sureTkAnswer: function() {
                        var t = this, e = 0, n = [];
                        if (this.questionInfo.is_yd && 1 == this.type) return !1;
                        if (this.arrayEq = !1, this.questionInfo.question_data.map(function(t, i) {
                            "" == t.value && e++, n.push(t.value);
                        }), 0 == n.length || e == n.length) return t.$toast("请先填写答案", "none"), !1;
                        1 == this.type && t.questionInfo.question_data.map(function(t, e) {
                            t.disabled = !0;
                        }), this.questionInfo.is_yd = !0, t.questionInfo.yd_answer = n;
                        var i = (0, s.isArrEqual)(this.questionInfo.yd_answer, this.questionInfo.answer_data);
                        (0, s.isEqual)(this.questionInfo.yd_answer, this.questionInfo.answer_data) && 1 == this.questionInfo.chaos_mate || i && 0 == this.questionInfo.chaos_mate ? (t.currectAnswerNum++, 
                        t.questionInfo.tx_answer = !0, setTimeout(function() {
                            t.next();
                        }, 300)) : (t.questionInfo.tx_answer = !1, t.errorAnswerNum++, t.computedArrayEq(), 
                        2 == t.type && setTimeout(function() {
                            t.next();
                        }, 300));
                    },
                    computedArrayEq: function() {
                        if (1 == this.questionInfo.chaos_mate) switch (this.questionInfo.type) {
                          case "2":
                          case "4":
                            this.arrayEq = !(0, s.isEqual)(this.questionInfo.yd_answer, this.questionInfo.answer_data);
                        } else switch (this.questionInfo.type) {
                          case "2":
                            this.arrayEq = !(0, s.isEqual)(this.questionInfo.yd_answer, this.questionInfo.answer_data);
                            break;

                          case "4":
                            this.arrayEq = !(0, s.isArrEqual)(this.questionInfo.yd_answer, this.questionInfo.answer_data);
                        }
                    },
                    getAZ: function(t) {
                        return [ "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z" ][t];
                    },
                    chooseJump: function(t) {
                        var e = this;
                        if (this.questionInfo.is_yd && 1 == this.type) return !1;
                        this.questionInfo.is_yd = !0, this.questionInfo.yd_answer = t, 2 == this.type && (this.iSchoose = t, 
                        this.questionInfo.isPanchoose = t), this.questionInfo.yd_answer == this.questionInfo.answer_data ? (e.currectAnswerNum++, 
                        e.questionInfo.tx_answer = !0, setTimeout(function() {
                            e.next();
                        }, 300)) : (e.questionInfo.tx_answer = !1, e.errorAnswerNum++, 2 == e.type && setTimeout(function() {
                            e.next();
                        }, 300)), this.$forceUpdate();
                    },
                    createZs: function(t) {
                        var e = {
                            paper_id: this.paper_id,
                            score: this.score,
                            data_id: t
                        };
                        (0, r.paperCert)(e).then(function(t) {});
                    },
                    submit: function(e) {
                        var n, i = this, s = 0, u = a(i.listTotal);
                        try {
                            for (u.s(); !(n = u.n()).done; ) {
                                n.value.is_yd || s++;
                            }
                        } catch (t) {
                            u.e(t);
                        } finally {
                            u.f();
                        }
                        i.score = 0, t.showModal({
                            confirmText: "确定",
                            cancelText: "取消",
                            showCancel: 1 == e,
                            title: 1 == e ? 0 == s ? "请确认是否提交试卷!" : "还有" + s + "题未作答,请确认是否提交试卷" : "答题时间已到，请提交试卷!",
                            success: function(t) {
                                var e = 0, n = 0;
                                if (t.confirm) {
                                    var s, u = a(i.listTotal);
                                    try {
                                        for (u.s(); !(s = u.n()).done; ) {
                                            var c = s.value;
                                            c.is_yd ? c.is_yd && !c.tx_answer && 2 == i.type ? n++ : c.tx_answer && c.is_yd && 2 == i.type ? (e++, 
                                            i.score = i.score + parseInt(c.score)) : c.tx_answer && c.is_yd && 1 == i.type && (i.score = i.score + parseInt(c.score)) : c.tx_answer = "";
                                        }
                                    } catch (t) {
                                        u.e(t);
                                    } finally {
                                        u.f();
                                    }
                                    clearInterval(i.timer);
                                    var f = {
                                        paper_id: i.paper_id,
                                        score: i.score,
                                        yes_num: 1 == i.type ? i.currectAnswerNum : e,
                                        wrong_num: 1 == i.type ? i.errorAnswerNum : n,
                                        data: i.listTotal,
                                        use_time: i.second
                                    };
                                    (0, r.questionSubmit)(f).then(function(t) {
                                        1 == i.paper.is_cert && parseInt(i.score) >= parseInt(i.paper.cert_score) && i.createZs(t), 
                                        (0, o.route)({
                                            url: "/question/detail/success",
                                            type: 3,
                                            data: {
                                                id: t
                                            }
                                        });
                                    });
                                }
                            }
                        });
                    }
                }
            };
            e.default = d;
        }).call(this, n("543d").default);
    }
}, [ [ "a541", "common/runtime", "common/vendor" ] ] ]);